<template>
  <div class="main">
    <van-sticky z-index="999">
      <lz-header></lz-header>
    </van-sticky>
<!--    首页搜索-->
    <search></search>
<!--    首页轮播图-->
    <swiper :data="form.banner"></swiper>
<!--    热门文档-->
    <hot-doc :data="form.popList"></hot-doc>
<!--    中部广告-->
    <swiper-center></swiper-center>
<!--    模块标题-->
    <menu-font></menu-font>
<!--    免费精选-->
    <model></model>
<!--    精选文档-->
    <premium :data="form.qualityList"></premium>
<!--    个性定制-->
    <customized></customized>
<!--    最新文档-->
    <new-doc :data="form.newestList"></new-doc>
    <lz-to-top></lz-to-top>
    <lz-footer></lz-footer>
  </div>
</template>

<script>
import swiper from './components/swiper.vue'
import search from './components/search.vue'
import menuFont from './components/menu.vue'
import HotDoc from "@/page/pageHome/components/hotDoc.vue";
import swiperCenter from './components/swiperCenter.vue'
import model from './components/model.vue'
import premium from './components/premiumDoc.vue'
import customized from './components/customized.vue'
import newDoc from './components/newDoc.vue'
import {bidProposal} from "@/api/apiFox";

  export default {
  components:{swiper,search,menuFont,HotDoc,swiperCenter,model,premium,customized,newDoc},
    data(){
      return{
        form:{
          banner:[],
          popList:[],
          newestList:[],
          qualityList:[]
        }
      }
    },
    methods:{
      getList(){
        bidProposal().then(res=>{
          console.log(res)
          this.form = {
            banner:res.banner,
            popList:res.doc.popList || [],
            newestList:res.doc.newestList || [],
            qualityList:res.doc.qualityList || []
          }
        }).catch(err=>{})
      }
    },
    mounted() {
      this.getList()
    }
  }
</script>
<style lang="scss" scoped>
.main{
  width: 100%;
  min-height: 100vh;
}
</style>
